<%-- 
    Document   : viewelection
    Created on : Oct 22, 2012, 5:40:53 PM
    author : Mishal Parmar

--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        
<%@page import="entityclasses.election"%>
<%@page import="controllers.viewElection"%>
<%@page import="java.util.ArrayList"%>
        
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>JSP Page</title>
    </head>
    <body>
    <%
        
        viewElection electionview =new viewElection();
       election elect=new election();
        ArrayList array = new ArrayList();  
        Object result = request.getAttribute("viewelection");  

        array = (ArrayList<election>) result;  

        out.println("<h1> Election List </h1> <table border=1>");
        for(int i=0;i<array.size();i++)
         {
            out.println("<tr>");
        elect= (election) array.get(i);
        out.println("<Td>" +elect.getElect_year());  
        out.println("<Td>" + elect.getCommissioner_id());
        out.println("<td>"+elect.getStart_time());  
        out.println("<td>"+elect.getEnd_time());
        out.println("<td>"+elect.getNominee_start());  
        out.println("<td>"+elect.getNominee_end());
        out.println("<tr>");
         }
        out.println("<table>");
       
        %>
    </body>
</html>
